package com.ruoyi.dynamic.controller.app;


import com.ruoyi.common.core.constant.constant.PathConstant;
import com.ruoyi.common.core.context.SecurityContextHolder;
import com.ruoyi.common.core.pojo.result.Pages;
import com.ruoyi.common.core.pojo.vo.PageVO;
import com.ruoyi.common.core.pojo.vo.SingleVO;
import com.ruoyi.common.core.result.Result;
import com.ruoyi.dynamic.model.pojo.request.app.AppRoomRankSearchRequest;
import com.ruoyi.dynamic.model.pojo.result.app.AppRoomRankUserInfoResult;
import com.ruoyi.dynamic.model.pojo.result.app.AppRoomUserInfoResult;
import com.ruoyi.dynamic.service.IRoomGiftRecordService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springdoc.api.annotations.ParameterObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Tag(name = "App-房间排行榜相关", description = "App-房间排行榜相关")
@RestController
@RequestMapping(PathConstant.APP_PATH + "room-rank")
public class AppRoomRankController {

    @Autowired
    private IRoomGiftRecordService iRoomGiftRecordService;

    @Operation(summary = "小时榜/魅力榜/男生榜单", description = "小时榜")
    @GetMapping
    public SingleVO<AppRoomRankUserInfoResult> listPage(@ParameterObject AppRoomRankSearchRequest request) {
        return Result.single(iRoomGiftRecordService.listPage(request, SecurityContextHolder.getUserId()));
    }

}

